<?php
    require_once "../config/db.php";
        
    class Update extends DB{ 
        function upd_user($str, $id){
            $sql = "UPDATE users SET name=".$str[0].", surname=".$str[1].", email=".$str[2].", fac_id=".$str[3].", group_id=".$str[4].", status=".$str[5]." WHERE id_user=".$id;
            $res = $this->sql($sql);
            return $res;
            //echo $sql;
        }
        
        function del_usr($id){
            $sql = "DELETE FROM users WHERE id_user =".$id;         
            $res = $this->sql($sql);
            return $res;
        }       
    }                                                  
?>
